<!DOCTYPE html>
<html class="x-admin-sm">
    
    <head>
        <meta charset="UTF-8">
        <title>家政管理系统-V6.8</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/font.css">
        <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/xadmin.css">
        <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/static/lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/xadmin.js"></script>
        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>
            <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
            <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div class="layui-fluid">
            <div class="layui-row">
                <form class="layui-form">
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="name" class="layui-form-label">
                          客户姓名
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="name" name="name" required="" lay-verify="name"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="tel" class="layui-form-label">
                          联系方式                      
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="tel" name="tel" required="" lay-verify="tel"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>

                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="num" class="layui-form-label">
                          流水号
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="num" name="num" required="" lay-verify="num"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>

                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="cardnum" class="layui-form-label">
                          卡号
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="cardnum" name="cardnum" required="" lay-verify="cardnum"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="starttime" class="layui-form-label">
                          办卡日期
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="starttime" name="starttime" required="" lay-verify="starttime"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="endtime" class="layui-form-label">
                          到期日期
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="endtime" name="endtime" required="" lay-verify="endtime"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="ytime" class="layui-form-label">
                          可用工时                      
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="ytime" name="ytime" required="" lay-verify="ytime"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="stime" class="layui-form-label">
                          剩余工时                      
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="stime" name="stime" required="" lay-verify="stime"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="price" class="layui-form-label">
                          单价                     
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="price" name="price" required="" lay-verify="price"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="money" class="layui-form-label">
                          卡的面额                     
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="money" name="money" required="" lay-verify="money"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="area" class="layui-form-label">
                          建筑面积                     
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="area" name="area" required="" lay-verify="area"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="room" class="layui-form-label">
                          几房几厅                    
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="room" name="room" required="" lay-verify="room"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="cost" class="layui-form-label">
                          钟点工价                    
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="cost" name="cost" required="" lay-verify="cost"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="floor" class="layui-form-label">
                          木质地板                    
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="floor" name="floor" required="" lay-verify="floor"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="sofa" class="layui-form-label">
                          沙发配置                    
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="sofa" name="sofa" required="" lay-verify="sofa"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="sfloor" class="layui-form-label">
                          实地板                    
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="sfloor" name="sfloor" required="" lay-verify="sfloor"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="carpet" class="layui-form-label">
                         地毯配置                    
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="carpet" name="carpet" required="" lay-verify="carpet"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="analysis" class="layui-form-label">
                          客户分析                    
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="analysis" name="analysis" required="" lay-verify="analysis"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="sort" class="layui-form-label">
                          客户分类                    
                      </label>
                      <div class="layui-input-inline">
                            <select id="sort" name="sort" class="sort">
                                <option value="1">1类</option>
                                <option value="2">2类</option></select>
                        </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="fit" class="layui-form-label">
                          配合度                     
                      </label>
                      <div class="layui-input-inline">
                            <select id="fit" name="fit" class="valid">
                                <option value="1">配合</option>
                                <option value="2">不配合</option></select>
                        </div>
                  </div>
                  <div class="layui-form-item" style="display: inline-block;">
                      <label for="address" class="layui-form-label">
                          详细地址                      
                      </label>
                      <div class="layui-input-inline">
                          <input type="text" id="address" name="address" required="" lay-verify="address"
                          autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item layui-form-text">
                      <label for="dispose" class="layui-form-label">室内配置</label>
                      <div class="layui-input-block">
                          <textarea placeholder="" id="dispose" name="dispose" class="layui-textarea"></textarea>
                      </div>
                  </div>
                  
                  <div class="layui-form-item layui-form-text">
                      <label for="desc" class="layui-form-label">备注</label>
                      <div class="layui-input-block">
                          <textarea placeholder="请输入内容" id="desc" name="desc" class="layui-textarea"></textarea>
                      </div>
                  </div>
                  <div class="layui-form-item">
                      <label for="L_repass" class="layui-form-label">
                      </label>
                      <button  class="layui-btn" lay-filter="add" lay-submit="">
                          增加
                      </button>
                  </div>
              </form>
            </div>
        </div>
        <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/xcity.js"></script>
        <script>

        layui.use(['laydate','form'], function(){
        var laydate = layui.laydate;
        var form = layui.form;
        
        //执行一个laydate实例
        laydate.render({
          elem: '#starttime' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
          elem: '#endtime' //指定元素
        });
      });
       
        layui.use(['form', 'layer'],

            
            function() {
                $ = layui.jquery;
                var form = layui.form,
                layer = layui.layer;

                //自定义验证规则
                form.verify({
                    L_name: function(value) {
                        if (value.length < 5) {
                            return '昵称至少得5个字符啊';
                        }
                    },
                    pass: [/(.+){6,12}$/, '密码必须6到12位'],
                    repass: function(value) {
                        if ($('#L_pass').val() != $('#L_repass').val()) {
                            return '两次密码不一致';
                        }
                    }
                });

                //监听提交
                form.on('submit(add)',
                function(data) {
                    console.log(data);
                    //发异步，把数据提交给php
                    layer.alert("增加成功", {
                        icon: 6
                    },
                    function() {
                        //关闭当前frame
                        xadmin.close();

                        // 可以对父窗口进行刷新 
                        xadmin.father_reload();
                    });
                    return false;
                });

            });</script>
        <script>var _hmt = _hmt || []; (function() {
                var hm = document.createElement("script");
                hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(hm, s);
            })();</script>
    </body>

</html>
